<template>
  <div style="text-align: center; width: 680px; margin: auto; background: #fff">
    <table
        cellpadding="0"
        cellspacing="0"
        style="
        table-layout: fixed;
        position: relative;
        width: 95%;
        font-family: 仿宋_GB2312;
        font-size: 16px;
        margin: auto;
      "
    >
      <tr style="height: 10px">
        <td
            v-for="item in 100"
            :key="item"
            style="width: 1%; text-align: center"
        />
      </tr>
      <tr style="height: 60px">
        <td colspan="100" style="text-align: center">
          <span id="Lab_title" style="font-size: 24px; font-weight: bold"
          >水利水电工程施工企业安全生产管理人员<br/>考核合格证书个人申领申请表</span
          >
        </td>
      </tr>
      <tr style="height: 50px">
        <td colspan="14" class="TableBorderOther">姓名</td>
        <td colspan="14" class="TableBorderOther">
          {{tempFormData.name}}
        </td>
        <td colspan="14" class="TableBorderOther">性别</td>
        <td colspan="14" class="TableBorderOther">
          {{$dict('sex').get(tempFormData.sex)}}
        </td>
        <td colspan="14" class="TableBorderOther">职务</td>
        <td colspan="14" class="TableBorderOther">
          {{tempFormData.duty}}
        </td>
        <td colspan="16" rowspan="4" class="TableBorderRight">
          <img
              style="width: 100%; height: 100%"
              :src="tempFormData.idPhoto && tempFormData.idPhoto.thumbnailUri"
              alt=""
          />
        </td>
      </tr>
      <tr style="height: 50px">
        <td colspan="14" class="TableBorderOther">身份证号</td>
        <td colspan="42" class="TableBorderOther">
          {{tempFormData.paperCode}}
        </td>
        <td colspan="14" class="TableBorderOther">职称</td>
        <td colspan="14" class="TableBorderOther">
          <Cascader
              :disabled="true"
              v-model="tempFormData.titleLevel"
              :options="titleLevelDict"
              :filterable="true"
              :change-on-select="true"
              :show-full-levels="false"
              placeholder=""
          ></Cascader>
        </td>
      </tr>
      <tr style="height: 50px">
        <td colspan="14" class="TableBorderOther">企业名称</td>
        <td colspan="70" class="TableBorderOther">
          {{tempFormData.entName}}
        </td>
      </tr>
      <tr style="height: 50px">
        <td colspan="14" class="TableBorderOther">资质等级</td>
        <td colspan="14" class="TableBorderOther">
          <Aselect
              :disabled="true"
              v-model="tempFormData.entLevel"
              :options="entLevelDict"
              placeholder=""></Aselect>
        </td>
        <td colspan="28" class="TableBorderOther">管理人员类别</td>
        <td colspan="28" class="TableBorderOther">
          <Aselect
              :disabled="true"
              v-model="tempFormData.safeTypeCode"
              :options="safeTypeDict"
              placeholder=""
          />
        </td>
      </tr>
      <tr style="height: 50px">
        <td colspan="20" class="TableBorderBottom">联系电话</td>
        <td colspan="80" class="TableBorderRightBottom">
          {{tempFormData.phone}}
        </td>
      </tr>
    </table>
  </div>
</template>

<script>
import safeTypeDict from '@/assets/js/safeTypeDict.js';
import titleLevelDict from "@/assets/js/titleLevelDict";
import Cascader from "@/components/Select/Cascader";
import Aselect from '@/components/Select/Aselect';

export default {
  props: {
    formData: {
      type: Object,
      default: () => {},
    },
  },
  name: "Word1",
  components: { Aselect, Cascader },
  watch: {
    formData: {
      handler(val) {
        console.log('in?',val);
        this.tempFormData = val || {};
      },
      immediate: true,
    },
  },
  data() {
    return {
      tempFormData: {},
      entLevelDict: safeTypeDict.entLevel,
      safeTypeDict: safeTypeDict.safeType,
      titleLevelDict: titleLevelDict.titleLevel,
    }
  }
}
</script>

<style lang="scss" scoped>
@import '../../../../../../assets/styles/word.scss';

</style>
